import Layout from "@/layout/layout.vue";
import Error from "@/views/error.vue";
import { RouteRecordRaw } from "vue-router";
// import Login from "@/views/login.vue";
import NewLogin from "@/views/NewLogin.vue";

import Iframe from "@/views/iframe.vue";

/**
 * 框架基础路由
 */
const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    component: Layout,
    redirect: "/home",
    meta: { title: "ui.router.pageWorkbench", icon: "icon-desktop" },
    children: [
      {
        path: "/home",
        component: () => import("@/views/home.vue"),
        meta: { title: "ui.router.pageHome", icon: "icon-home" }
      }
    ]
  },
  // {
  //   path: "/login",
  //   component: Login,
  //   meta: { title: "ui.router.pageLogin", isNavigationMenu: false }
  // },
  {
    path: "/login",
    component: NewLogin,
    meta: { title: "ui.router.pageLogin", isNavigationMenu: false }
  },
  {
    path: "/user/password",
    component: () => import("@/views/sys/user-update-password.vue"),
    meta: { title: "ui.user.links.editPassword", requiresAuth: true, isNavigationMenu: false }
  },
  {
    path: "/iframe/:id?",
    component: Iframe,
    meta: { title: "iframe", isNavigationMenu: false }
  },
  {
    path: "/error",
    name: "error",
    component: Error,
    meta: { title: "ui.router.pageError", isNavigationMenu: false }
  },
  {
    path: "/noc/noc-followup-list",
    component: () => import("@/views/noc/noc-followup-list.vue"),
    meta: { title: "电话回访列表", isNavigationMenu: false }
  },
  {
    path: "/noc/noc-followup-task",
    component: () => import("@/views/noc/noc-followup-task.vue"),
    meta: { title: "当前回访任务", isNavigationMenu: false }
  },
  {
    path: '/search-result',
    name: 'SearchResult',
    component: () => import("@/views/buyer/SearchResult.vue"),
    meta: { title: "找企业", isNavigationMenu: false }
  },
  {
    path: "/expocube/call-center",
    component: () => import("@/views/expocube/call-center.vue"),
    meta: { title: "任务联络中心", isNavigationMenu: false }
  },
  {
    path: "/expocube/personnel-information-details",
    component: () => import("@/views/expocube/personnel-information-details.vue"),
    meta: { title: "基本信息查询人员详情", isNavigationMenu: false }
  },
  {
    path: "/expocube/information-list-favorites",
    component: () => import("@/views/expocube/information-list-favorites.vue"),
    meta: { title: "收藏夹查询信息列表", isNavigationMenu: false }
  },
  {
    path: "/expocube/information-list-import",
    component: () => import("@/views/expocube/information-list-import.vue"),
    meta: { title: "导入信息查询列表", isNavigationMenu: false }
  },
  {
    path: "/expocube/information-list-common",
    component: () => import("@/views/expocube/information-list-common.vue"),
    meta: { title: "人员查询页面", isNavigationMenu: false }
  },
  {
    path: "/noc/entry-credentials",
    component: () => import("@/views/noc/entry-credentials.vue"),
    meta: { title: "现场办证", isNavigationMenu: false }
  },
  {
    path: "/program/nocproduct-list-add-or-update",
    component: () => import("@/views/program/nocproduct-list-add-or-update.vue"),
    meta: { title: "新增/编辑产品", isNavigationMenu: false }
  },
  {
    // 展厅管理
    path: "/buyer/showroom/list",
    component: () => import("@/views/showroom/list.vue"),
    meta: { title: "展厅管理", isNavigationMenu: false }
  },  {
    // 展厅管理-电子画册
    path: "/buyer/showroom/pictureBook",
    component: () => import("@/views/showroom/picture-book.vue"),
    meta: { title: "电子画册", isNavigationMenu: false }
  },
  {
    // 展厅管理-公司简介
    path: "/buyer/showroom/introduction",
    component: () => import("@/views/showroom/introduction.vue"),
    meta: { title: "公司简介", isNavigationMenu: false }
  },
  {
    // 展厅管理-宣传视频
    path: "/buyer/showroom/promotion",
    component: () => import("@/views/showroom/promotion.vue"),
    meta: { title: "宣传视频", isNavigationMenu: false }
  },
  {
    // 买家客户库列表页
    path: "/buyer/customers/list",
    component: () => import("@/views/buyer/list.vue"),
    meta: { title: "买家客户库", isNavigationMenu: false }
  }, {
    // 买家客户库列表页
    path: "/company-detail",
    component: () => import("@/views/buyer/CompanyDetail.vue"),
    meta: { title: "企业详情", isNavigationMenu: false }
  },
  {
    path: '/order-confirm',
    name: 'OrderConfirm',
    component: () => import("@/views/buyer/OrderConfirm.vue"),
    meta: { title: "订单确认", isNavigationMenu: false }
  },
  {
    path: '/buyer/agreement-text',
    component: () => import('@/views/buyer/agreement-text.vue'),
     meta: { title: "会员服务协议", isNavigationMenu: false }
  },
  {
    path: "/program/attribute-list-add-or-update",
    component: () => import("@/views/program/attribute-list-add-or-update.vue"),
    meta: { title: "新增/编辑属性组", isNavigationMenu: false }
  },
  {
    path: "/program/nocproduct-view",
    component: () => import("@/views/program/nocproduct-view.vue"),
    meta: { title: "查看产品", isNavigationMenu: false }
  },
  {
    path: "/program/select-product-series",
    component: () => import("@/views/program/select-product-series.vue"),
    meta: { title: "选择产品", isNavigationMenu: false }
  },
  {
    path: "/program/attribute-list-addattribute",
    component: () => import("@/views/program/attribute-list-addattribute.vue"),
    meta: { title: "新增/编辑属性组配置", isNavigationMenu: false }
  },
  {
    path: "/program/nocproduct-view-audit",
    component: () => import("@/views/program/nocproduct-view-audit.vue"),
    meta: { title: "审核页面", isNavigationMenu: false }
  },
  {
    path: "/program/nocorder-view",
    component: () => import("@/views/program/nocorder-view.vue"),
    meta: { title: "订单详情", isNavigationMenu: false }
  },
  {
    path: "/program/nocorder-add",
    component: () => import("@/views/program/nocorder-add.vue"),
    meta: { title: "新增订单", isNavigationMenu: false }
  },
  {
    path: "/cnas/makemoney-public",
    component: () => import("@/views/cnas/makemoney-public.vue"),
    meta: { title: "对公打款", isNavigationMenu: false }
  },
  {
    path: "/cnas/certification-process",
    component: () => import("@/views/cnas/certification-process.vue"),
    meta: { title: "资料填写", isNavigationMenu: false }
  },
  {
    path: "/cnas/certification-results",
    component: () => import("@/views/cnas/certification-results.vue"),
    meta: { title: "认证结果", isNavigationMenu: false }
  },
  {
    path: "/cnas/user-agreement",
    component: () => import("@/views/cnas/user-agreement.vue"),
    meta: { title: "用户协议", isNavigationMenu: false }
  },
  {
    path: "/cnas/privacy-policy",
    component: () => import("@/views/cnas/privacy-policy.vue"),
    meta: { title: "隐私政策", isNavigationMenu: false }
  },

];

export const errorRoute: Array<RouteRecordRaw> = [
  {
    path: "/:path(.*)*",
    redirect: { path: "/error", query: { to: 404 }, replace: true },
    meta: { isNavigationMenu: false }
  },

];

export default routes;


